import crafttweaker.api.item.IItemStack;
#loadfirst

public class Make {

		public buildOre(name as string,finished as IItemStack,materials as IItemStack) as void{
			<recipetype:create:mixing>.addRecipe(name,
				"none",
				finished*1,
				[materials * 8,<item:minecraft:stone>]
			);
		}
		
		public compound(name as string,finished as IItemStack,materials as IItemStack,middle as IItemStack) as void{
			recipes.removeRecipe(finished);

			craftingTable.addShaped(name,finished,[
				[materials,materials,materials],
				[materials,middle,materials],
				[materials,materials,materials]
			]);
		}
		
		public compound(name as string,finished as IItemStack,
						topLeft as IItemStack,top as IItemStack,topRight as IItemStack,
						left as IItemStack,middle as IItemStack,right as IItemStack,
						downLeft as IItemStack,down as IItemStack,downRight as IItemStack) as void{
			recipes.removeRecipe(finished);

			craftingTable.addShaped(name,finished,[
				[topLeft,top,topRight],
				[left,middle,right],
				[downLeft,down,downRight]
			]);
		}
		
		public compound(name as string,finished as IItemStack,number as int,
						topLeft as IItemStack,top as IItemStack,topRight as IItemStack,
						left as IItemStack,middle as IItemStack,right as IItemStack,
						downLeft as IItemStack,down as IItemStack,downRight as IItemStack) as void{
			recipes.removeRecipe(finished);

			craftingTable.addShaped(name,finished * number,[
				[topLeft,top,topRight],
				[left,middle,right],
				[downLeft,down,downRight]
			]);
		}
		
		public plate(name as string,finished as IItemStack,materials as IItemStack) as void{
			recipes.removeRecipe(finished);
			craftingTable.addShapeless(name,finished,[materials,materials,<item:immersiveengineering:hammer>]);
		}
		
		public blastFurnace(name as string,materials as IItemStack,tick as int,finished as IItemStack,ByProduct as IItemStack) as void{
			<recipetype:immersiveengineering:blast_furnace>.removeRecipe(finished);
			
			<recipetype:immersiveengineering:blast_furnace>.addRecipe(name,materials,tick,finished,ByProduct);
			//名字、材料、时间、产物、副产物
		}
		
		public blastFurnace(name as string,materials as IItemStack,tick as int,finished as IItemStack,finishedNumber as int,ByProduct as IItemStack) as void{
			<recipetype:immersiveengineering:blast_furnace>.removeRecipe(finished);
			
			<recipetype:immersiveengineering:blast_furnace>.addRecipe(name,materials,tick,finished * finishedNumber,ByProduct);
			//名字、材料、时间、产物、副产物
		}
		
		public blastFurnace(name as string,materials as IItemStack,tick as int,finished as IItemStack,ByProduct as IItemStack,ByNumber as int) as void{
			<recipetype:immersiveengineering:blast_furnace>.removeRecipe(finished);
			
			<recipetype:immersiveengineering:blast_furnace>.addRecipe(name,materials,tick,finished,ByProduct * ByNumber);
			//名字、材料、时间、产物、副产物
		}
		/*
		*	沉浸电容
		*/
		public immCapacitor(name as string,name2 as string,finished as IItemStack,
						materials as IItemStack,materials2 as IItemStack,materials3 as IItemStack,materials4 as IItemStack) as void{
			val treated as IItemStack = <item:immersiveengineering:treated_wood_horizontal>;
			val iron_block as IItemStack = <item:minecraft:iron_block>;
			val capacitor as IItemStack = <item:createaddition:capacitor>;
			recipes.removeRecipe(finished);
			mods.extendedcrafting.TableCrafting.addShaped(name,0,finished,[
				[treated, iron_block,iron_block , iron_block, treated], 
				[materials,capacitor , materials2, capacitor, materials], 
				[treated, capacitor,materials3 , capacitor,treated], 
				[materials, capacitor, materials2, capacitor, materials], 
				[treated, treated, materials4, treated, treated]
			]);

			<recipetype:create:mechanical_crafting>.addRecipe(name2,finished,[
				[treated, iron_block,iron_block , iron_block, treated], 
				[materials,capacitor , materials2, capacitor, materials], 
				[treated, capacitor,materials3 , capacitor,treated], 
				[materials, capacitor, materials2, capacitor, materials], 
				[treated, treated, materials4, treated, treated]
			]);
		}
}